home *** CD-ROM | disk | FTP | other *** search
/ Level 2005 Christmas (DVD) / Level_2005-XMAS_134_DVD_Knightshift.iso / Demos / Ski Racing 2006 / setup1.cab / DataCommonShadersDX9Ghost.vsh < prev    next >
Encoding:
Text File  |  2005-11-03  |  706 b   |  26 lines

  1. vs.1.1
  2.  
  3. ;Vertex packing
  4. ;dcl_position v0
  5. ;dcl_normal v1
  6.  
  7. ;Constant map from the NSF.  
  8. ;CM_Defined      WorldViewProj  0    0
  9. ;CM_Defined      WorldView      4    4
  10. ;CM_Constant     Half           5    1   0.5,0.5,0.5,0.5                
  11. ;CM_Constant     Zero           6    1   0.0,0.0,0.0,0.0
  12.  
  13. ;Transform normal to viewspace
  14. ;m4x4 r10, v1, c4
  15. mov r10, v1
  16.  
  17. ; Shouldn't be necessary to normalize normal since we hopefully got an orthogonal transform and unit source normals
  18.  
  19. ;Expand normal to texture coords (N * 0.5f + 0.5f)
  20. ;mad r10, r10, c5, c5
  21.  
  22. ;Calculate environment texture coords from worldspace normal
  23. mov oT0.xy, r10.xy
  24.  
  25. ;Transform position to clip space
  26. m4x4 oPos, v0, c0